# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>

_realname=libxmp
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.6.3
pkgrel=1
pkgdesc="Libxmp is a library that renders module files to PCM data. (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_repository_url='https://github.com/libxmp/libxmp/'
url="https://xmp.sourceforge.net/"
license=('spdx:MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
             "${MINGW_PACKAGE_PREFIX}-python-docutils"
             "${MINGW_PACKAGE_PREFIX}-autotools")
optdepends=("${MINGW_PACKAGE_PREFIX}-unrar")
source=("https://github.com/libxmp/libxmp/releases/download/libxmp-${pkgver}/libxmp-${pkgver}.tar.gz")
sha256sums=('b189a2ff3f3eef0008512e0fb27c2cdc27480bc1066b82590a84d02548fab96d')

build() {
  cd "${_realname}-${pkgver}"
  ./configure --enable-static
  make
  make docs/libxmp.3
}

package() {
  cd "${_realname}-${pkgver}"
  install -D -m644 "docs/libxmp.3" "${pkgdir}${MINGW_PREFIX}/share/man/man3/libxmp.3"
  make DESTDIR="${pkgdir}" install
}
